
/**
 * [setData 设置剪贴板内容，另外注意的是'Forms.Form.1'可能经常无法调用]
 * @param {[string]} content [剪切板的内容]
 */
function setData(content){
	var form = new ActiveXObject('Forms.Form.1');
	var textBox = form.Controls.Add('Forms.TextBox.1').Object;
	textBox.MultiLine = true;
	textBox.Text = content;
	textBox.SelStart = 0;
	textBox.SelLength =  textBox.TextLength;
	TextBox.Copy;
}

/**
 * [setDataByCmd 通过cmd的clip命令复制剪贴板]
 * @param {[string]} content [要复制的内容]
 */
function setDataByCmd(content){
	var shell = new ActiveXObject('WScript.Shell');
	shell.Run('cmd.exe /c echo | set /p dummmyName='+content+'|clip', 0, false);
}



/**
 * [getData 获取剪贴板的内容]
 * @return {[void]}
 */
function getData(){
	var form = new ActiveXObject('Forms.Form.1');
	var textBox = form.Controls.Add('Forms.TextBox.1').Object;
	textBox.MultiLine = true;
	if(textBox.CanPaste){
		textBox.Paste;
		WScript.Echo(textBox.Text);
	}
}



var fullPath = '"'+WScript.Arguments(0)+'"';
setDataByCmd(fullPath);